<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
 
<s:form action="user/update.do" method="post" id="edit_user_info_form" name="edit_user_info_form">
	<s:hidden name="userid" id="userid"/>
	<table class="form-table">
		<tr >
			<th><span class="note_red">*</span>用户名：</th>
			<td>
				<s:textfield key="username" title="请输入新的用户名" cssClass="form-txtinput" id="username" size="30" maxlength="30"  checkEmpty="true" checkDesc="用户名" value="%{model.username}"/>
				<span class="descstyle">若不编辑用户名，请不要填写该项</span>
			</td>
		</tr>
		
		<tr>
			<th><span class="note_red">*</span>姓名：</th>
			<td>
				<s:textfield key="realname" title="请输入姓名" cssClass="form-txtinput" id="realname" size="30" maxlength="20"  checkEmpty="true" checkDesc="姓名" value="%{model.realname}"/>
				
				<span class="descstyle">&nbsp;最大长度为20个字符，只能为字母、数字、空格、中文</span>
			</td>
		</tr>
		<tr>
			<th>登录密码：</th>
			<td>
				<input title="请输入密码" name="pwd" type="password" id="pwd" size="30" maxlength="20" class="form-txtinput">
				<span class="descstyle">&nbsp;长度在6-20个字符之间，不允许包含空格</span>
			</td>
		</tr>
		<tr>
			<th>密码确认：</th>
			<td>
				<input title="请再一次输入密码" name="repwd" type="password" id="repwd" size="30" maxlength="20" class="form-txtinput">
				<span class="descstyle">&nbsp;长度在6-20个字符之间，不允许包含空格</span>
			</td>
		</tr>
		<tr>
			<th>选择部门：</th>
			<td>
				<span id="_dept_of_add_wf">${deptName}</span>
				<input type="hidden" name="deptid" value="${deptid}">
				<input name="selectDept" type="button" class='btn-short' title="点击选择部门" onClick="Ext.milan.pagejs.page_user.showSelectDeptWin('edit_user_info_form')" value="选择">
				<input type="button" class='btn-short' title="点击移除部门" onClick="Ext.milan.pagejs.page_user.removeSelectDeptWin('edit_user_info_form')" value="移除">
			</td>
		</tr>
		<tr>
			<th>选择权限组：</th>
			<td>
				<s:select key="groupIds" list="%{model.groupList}" listKey="selectUserIds" listValue="groupname" cssStyle="width:230px;" size="4" id="selected_privilege_group_list" multiple="true"/>
				<a title="添加" class="btn_short" href="javascript:void(0)" 
					onclick="Ext.milan.pagejs.page_user.showSelectPrivilegeGroupWin()">添加</a>
				<a title="移除" class="btn_short" href="javascript:void(0)" id="remove_privilege_group_btn" 
					onclick="Ext.milan.pagejs.page_user.removeSelectedItems('selected_privilege_group_list')">移除</a>
				<a title="移除全部" class="btn_long" href="javascript:void(0)" id="remove_all_privilege_group_btn" 
					onclick="Ext.milan.pagejs.page_user.removeAllItems('selected_privilege_group_list')">移除全部</a>
			</td>
		</tr>
		<tr>
			<th>用户类别：</th>
			<td>
				<s:select name="category" list="#{'':'--请选择--','1':'高管','2':'中层','3':'员工'}"></s:select>
			</td>
		</tr>
		<tr>
			<th>用户类别2：</th>
			<td>
				<s:select name="userrole" list="#{'':'--请选择--','0':'监督员','1':'高管领导','2':'部长','3':'副部长','4':'主任','5':'副主任','6':'主管','7':'组长','8':'主任助理','10':'员工'}"></s:select>
			</td>
		</tr>
		<tr>
			<th><span class="note_red"></span>业联部门：</th>
			<td>
				<span id="_dept_of_add_task">${taskdeptname}</span>
				<input type="hidden" name="taskdeptid">
				<input type="button" class='btn-short' title="点击选择部门" onClick="Ext.milan.pagejs.page_user.showSelectTaskDeptWin('edit_user_info_form')" value="选择">
				<input type="button" class='btn-short' title="点击移除部门" onClick="Ext.milan.pagejs.page_user.removeSelectTaskDeptWin('edit_user_info_form')" value="移除">
			</td>
		</tr>
		<tr>
			<th width="150">邮箱：</th>
			<td>
			<s:textfield key="email" title="请输入邮箱" cssClass="form-txtinput" id="tel" maxlength="20" value="%{model.email}"/>
			</td>
		</tr>
		<tr>
			<th>备注：</th>
			<td>
				<s:textarea cssClass="framingtable2" name="memo" cols="30" rows="3" id="memo" maxlength="100" style="behavior: url('js/maxlength.htc');height:60px;"></s:textarea>
				<span class="descstyle">&nbsp;最大长度为100个字符</span>
			</td>
		</tr>
	</table>
	<div class="win-btn-panel">
	    <a class="btn_short" title="点击新建用户" class="btn_short" href="javascript:void(0)" 
			onclick="Ext.milan.pagejs.page_user.editUser()">确 定</a>
		<a class="btn_short" title="点击取消新建" class="btn_short" href="javascript:void(0)" 
			onclick="Ext.milan.pagejs.page_user.closeWin()">取 消</a>
	</div>
</s:form>
<script type="text/javascript"> 
if(false){
	Element.hide("remove_privilege_group_btn");
	Element.hide("selected_privilege_group_list");
	Element.hide("remove_all_privilege_group_btn");
}
if(false){
	Element.hide("remove_user_pos_btn");
	Element.hide("position_selected_list");
	Element.hide("remove_all_user_pos_btn");
}
</script>
 

 